package demo1;

class Base2{//Base会报错，因为这个包里已经有Base了
    public void testA(){
        System.out.println("testA()");
    }
}

class Derived2 extends Base2{

    public void testA(){
        System.out.println("Derived2::testA()");
    }

    public void testB(){
        System.out.println("testB()");
    }
    public void testC(){
        this.testA();//继承过来的
        super.testA();
        this.testB();
    }
}

public class test4 {
    public static void main(String[] args) {
        Derived2 derived2=new Derived2();
        derived2.testC();
    }
}
